package com.gitee.luosl.cola.match.pattern;

import java.util.List;

/**
 * Created by luosl on 2021/03/31/10:41
 */
public class ListPattern<T> extends Pattern1<List<T>, List<T>> {

    private final Pattern1<List<T>, List<T>> pattern;

    public ListPattern(Pattern1<List<T>, List<T>> pattern) {
        this.pattern = pattern;
    }

    @Override
    public List<T> apply(List<T> value) {
        return pattern.apply(value);
    }

    @Override
    public boolean isDefinedAt(List<T> value) {
        return pattern.isDefinedAt(value);
    }
}
